package com.ruoyi.basedata.service.impl;

import com.ruoyi.basedata.domain.DmWarnStrategy;
import com.ruoyi.basedata.mapper.DmWarnStrategyMapper;
import com.ruoyi.basedata.service.IDmWarnStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 告警策略Service业务层处理
 * 
 * @author 告警策略
 * @date 2023-09-06
 */
@Service
public class DmWarnStrategyServiceImpl implements IDmWarnStrategyService 
{
    @Autowired
    private DmWarnStrategyMapper dmWarnStrategyMapper;

    /**
     * 查询告警策略
     * 
     * @param ID 告警策略主键
     * @return 告警策略
     */
    @Override
    public DmWarnStrategy selectDmWarnStrategyByID(Long ID)
    {
        return dmWarnStrategyMapper.selectDmWarnStrategyByID(ID);
    }

    /**
     * 查询告警策略列表
     * 
     * @param dmWarnStrategy 告警策略
     * @return 告警策略
     */
    @Override
    public List<DmWarnStrategy> selectDmWarnStrategyList(DmWarnStrategy dmWarnStrategy)
    {
        return dmWarnStrategyMapper.selectDmWarnStrategyList(dmWarnStrategy);
    }

    /**
     * 新增告警策略
     * 
     * @param dmWarnStrategy 告警策略
     * @return 结果
     */
    @Override
    public int insertDmWarnStrategy(DmWarnStrategy dmWarnStrategy)
    {
        return dmWarnStrategyMapper.insertDmWarnStrategy(dmWarnStrategy);
    }

    /**
     * 修改告警策略
     * 
     * @param dmWarnStrategy 告警策略
     * @return 结果
     */
    @Override
    public int updateDmWarnStrategy(DmWarnStrategy dmWarnStrategy)
    {
        return dmWarnStrategyMapper.updateDmWarnStrategy(dmWarnStrategy);
    }

    /**
     * 批量删除告警策略
     * 
     * @param IDs 需要删除的告警策略主键
     * @return 结果
     */
    @Override
    public int deleteDmWarnStrategyByIDs(Long[] IDs)
    {
        return dmWarnStrategyMapper.deleteDmWarnStrategyByIDs(IDs);
    }

    /**
     * 删除告警策略信息
     * 
     * @param ID 告警策略主键
     * @return 结果
     */
    @Override
    public int deleteDmWarnStrategyByID(Long ID)
    {
        return dmWarnStrategyMapper.deleteDmWarnStrategyByID(ID);
    }
}
